{% extends "layouts/base.html" %}
{% load lineage_extras %}
{% load i18n %}

{% block content %}
<div class="container mt-5">
  <div class="card shadow-lg p-4">
    <h2 class="text-center mb-4">{% trans "Top Tempo Online" %}</h2>

    <div class="table-responsive-md">
      <table class="table table-striped">
        <thead>
          <tr>
            <th>{% trans "Personagem" %}</th>
            <th>{% trans "PvP" %}</th>
            <th class="d-none d-md-table-cell">{% trans "PK" %}</th>
            <th>{% trans "Tempo Online" %}</th>
            <th class="d-none d-md-table-cell">{% trans "Clan" %}</th>
          </tr>
        </thead>
        <tbody>
          {% for player in ranking %}
          <tr>
            <td>{{ player.char_name }}</td>
            <td>{{ player.pvpkills }}</td>
            <td class="d-none d-md-table-cell">{{ player.pkkills }}</td>
            <td>{{ player.onlinetime|humanize_time }}</td>
            <td class="d-none d-md-table-cell">{{ player.clan_name|default:"-" }}</td>
          </tr>
          {% endfor %}
        </tbody>
      </table>
    </div>

  </div>
</div>
{% endblock %}
